* {
  box-sizing: border-box;
}

body {
  padding: 0;
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn {
  position: absolute;
  width: 80px;
  height: 30px;
  top: 5px;
  left: calc(50% - 25px);
  cursor: pointer;
  background-color: #f9ca24;
  text-align: center;
  line-height: 30px;
  color: white;
  border-radius: 5px;
  border-bottom: 4px solid #f6e58d;
}

.container {
  width: 800px;
  height: 800px;
  display: flex;
  /* overflow: hidden; */
  flex-wrap: wrap;
}

.box {
  width: 200px;
  height: 200px;
  background-color: red;
  position: relative;
  transition: all 0.5s ease;
  /* transform: translate(100px, 100px); */
  /* overflow: hidden; */
}
.img-container {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

img {
  position: absolute;
  width: 800px;
  height: 800px;
  z-index: 3;
}

.box::before {
  content: "";
  position: absolute;
  top: 100%;
  left: 0%;
  width: 100%;
  height: 20px; /* 阴影的高度 */
  background-color: #f9ca24; /* 阴影的颜色 */
  transform: skewX(45deg); /* 倾斜阴影 */
  transform-origin: top left; /* 设置旋转中心 */
}

.box::after {
  content: "";
  position: absolute;
  top: 0;
  left: 100%;
  width: 20px;
  height: 100%; /* 阴影的高度 */
  background-color: #f6e58d; /* 阴影的颜色 */
  transform: skewY(45deg); /* 倾斜阴影 */
  transform-origin: top left; /* 设置旋转中心 */
}

.animate {
  animation: rotate360 0.5s ease-out;
}

@keyframes rotate360 {
  from {
    transform: rotate(0deg); /* 起始角度 */
  }
  to {
    transform: rotate(360deg); /* 结束角度 */
  }
}
